package src.com.zt.demo.interface_extends_demo.objects_demo;


import src.com.zt.demo.digtal.Demo;


public class demo {
    public static void main(String[] args) {
        Object[] arr = new Object[4];

        arr[0] = new Object();
        arr[1] = new String("字符串");
        arr[2] = new Integer(10);
        arr[3] = new Demo();

        for(Object obj: arr){
            System.out.println(obj);
        }
    }

    @Override   //重写toString方法
    public String toString() {
        return "我是demo类";
    }
}
